Return to doc.sitecore.com

Content API Cookbook

Note: This document provides a conceptual overview of Application Programming Interfaces (APIs) that CMS developers can use to manage data in Sitecore databases, including field values, dynamic links between items, and troubleshooting information:

Click the respective link to download the whole document:

Sitecore CMS 6.4 and later version:

Sitecore CMS 6.2 version:

Sitecore CMS 6.0 version:

Table of Contents (valid for Sitecore CMS 6.2)

Working with Databases
    How to Access Sitecore Databases
        How to Access the Context Database
        How to Access a Database by Name
        How to Access the Content Database
    How to Publish
        How to Publish an Item or a Branch of Items
        How to Publish the Master Database
Working with Items
    How to Access an Item
        How to Access System Items
        How to Access System Data Templates
        How to Access the Context Item
        How to Resolve Item Access Rights
        How to Place an Item in Editing Mode
    How to Access Items Related to Another Item
        How to Access the Children of an Item
        How to Access a Branch of Items
        How to Access the Parent of an Item
        How to Access the Ancestors of an Item
    How to Access Items Using Sitecore Query
    How to Access Media Items
    How to Access Alternate Languages of an Item
    How to Access Alternate Versions of an Item
    How to Create an Item
        How to Create a Version of an Item in a Language
        How to Create a Media Library Item
            How to Create Media Items Using the File System
            How to Create Media Items Using APIs
    How to Access the Icon for an Item
    Item Operations: Rename, Move, Copy, and Delete
        How to Rename an Item
        How to Move an Item
        How to Copy an Item and Its Descendants
        How to Delete an Item and Its Descendants
            How to Delete the Descendants of an Item
    How to Create a Proxy Item
    How to Create an Alias
Working with Fields
    How to Access Fields
        How to Access System Fields
        How to Access a Field Using the FieldRender Web Control
        How to Access Checkbox Fields
        How to Access Date and Datetime Fields
        How to Access File Fields
        How to Access General Link Fields
        How to Access Image Fields
        How to Access Droplink, Droptree, and Grouped Droplink Fields
        How to Access Checklist, Multilist, Treelist, and TreelistEx Fields
    How to Access the Standard Value of a Field
    How to Determine if a Field Contains Its Standard Value
    How to Reset a Field to Its Standard Value
Working with Dynamic Links
    How to Access the Friendly URL of a Content Item
    How to Access the URL of an RSS Feed
    How to Access the Friendly URL of a Media Item
    How to Transform Dynamic Links in HTML to Friendly URLs
Syndication APIs
    Sitecore.Syndication Classes
        Sitecore.Syndication.FeedManager
        Sitecore.Syndication.FeedUtil
        Sitecore.Syndication.PublicFeed
    ASP.NET Syndication Classes
        System.ServiceModel.Syndication.SyndicationItem
Troubleshooting Content APIs
    Could Not Find Configuration Node
    Object Reference Not Set to an Instance of an Object
    Item Is Not in Editing Mode
    The Current User Does Not Have Write Access to This Item
    Add Access Required